import request from '@/utils/request'

export function listAddr() {
  return request({
    url: '/addr/list',
    method: 'get'
  })
}

export function addAddr(data) {
  return request({
    url: '/addr/add',
    method: 'post',
    data: data
  })
}

export function getAddr(addr_id) {
  return request({
    url: '/addr/' + addr_id + '/info',
    method: 'get'
  })
}

export function deleteAddr(addr_id) {
  return request({
    url: '/addr/' + addr_id + '/delete',
    method: 'delete'
  })
}

export function updateAddr(data) {
  return request({
    url: '/addr/update',
    method: 'put',
    data: data
  })
}
